package snailAI.Entity;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.math.BigDecimal;

/**
 * @Author: 马宇航
 * @Description: 用于 ES
 * @DateTime: 25/10/30/星期四 10:42
 * @Component: 成都蜗牛学苑
 **/
@Document(indexName = "woniumall")
@Data
public class SnailMall {
    @Id
    @Field(name = "id",type = FieldType.Keyword)
    private String id;
    //text类型：进行分词，存储分词后的结果
    @Field(type = FieldType.Text,analyzer = "ik_max_word",searchAnalyzer = "ik_smart")
    private String name;
    @Field(type = FieldType.Text)
    private String goodsno;
    @Field(type = FieldType.Text,analyzer = "ik_max_word",searchAnalyzer = "ik_smart")
    private String publisher;
    @Field
    private String pubtime;
    @Field(type = FieldType.Text,analyzer = "ik_max_word",searchAnalyzer = "ik_smart")
    private String description;
    @Field
    private BigDecimal salesprice;
    @Field
    private int salenums;
}